import { axios } from '@/utils/request'

export function fetchList (formCode, params) {
  return axios({
    url: `/form/data/page/${formCode}`,
    method: 'GET',
    params
  })
}

export function getObj (id) {
  return axios({
    url: `/form/data/info/${id}`,
    method: 'GET'
  })
}

export function addObj (obj) {
  return axios({
    url: '/form/data/save',
    method: 'POST',
    data: obj
  })
}

export function putObj (obj) {
  return axios({
    url: '/form/data/update',
    method: 'POST',
    data: obj
  })
}

export function delObj (id) {
  return axios({
    url: `/form/data/del/${id}`,
    method: 'DELETE'
  })
}
